<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns a list of instrumented calls that have occurred</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="ref.scoutapm.html">« Scoutapm 函数</a></li>
      <li style="float: right;"><a href="function.scoutapm-list-instrumented-functions.html">scoutapm_list_instrumented_functions »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.scoutapm.html">Scoutapm 函数</a></li>
    <li>Returns a list of instrumented calls that have occurred</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.scoutapm-get-calls" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">scoutapm_get_calls</h1>
  <p class="verinfo">(PECL scoutapm &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">scoutapm_get_calls</span> &mdash; <span class="dc-title">Returns a list of instrumented calls that have occurred</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.scoutapm-get-calls-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>scoutapm_get_calls</strong></span>(): <span class="type">array</span></div>

  <p class="para rdfs-comment">Returns a list of any instrumented function calls since <span class="function"><strong>scoutapm_get_calls()</strong></span> was last called. The list is cleared each time the function is called.</p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.scoutapm-get-calls-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.scoutapm-get-calls-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <span class="function"><strong>scoutapm_get_calls()</strong></span> returns an array containing a list
   of all recorded calls to instrumented function calls.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.scoutapm-get-calls-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4456"><p><strong>示例 #1 Fetch instrumented calls</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'a.txt'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'b.txt'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">scoutapm_get_calls</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
     <div class="cdata"><pre>
Array
(
    [0] =&gt; Array
        (
            [function] =&gt; file_get_contents
            [entered] =&gt; 1576839727.7934
            [exited] =&gt; 1576839727.7935
            [time_taken] =&gt; 2.7894973754883E-5
            [argv] =&gt; Array
                (
                    [0] =&gt; a.txt
                )

        )

    [1] =&gt; Array
        (
            [function] =&gt; file_get_contents
            [entered] =&gt; 1576839727.7935
            [exited] =&gt; 1576839727.7935
            [time_taken] =&gt; 7.8678131103516E-6
            [argv] =&gt; Array
                (
                    [0] =&gt; b.txt
                )

        )

)
</pre></div>
    </div>
   </div>
  </p>
 </div>



</div></div></div></body></html>